<style>
  /*报价单样式*/
  .kuang {
    border: 2px solid #000;
    min-width: 800px;
    color: #000;
    font-weight: bold;
  }

  .kuang .titlee {
    height: 60px;
    line-height: 55px;
    text-align: center;
    font-size: 25px;
    font-weight: bold;
    border-bottom: 2px solid #000;
  }

  .kk {
    line-height: 30px;
    padding: 10px 0;
    font-size: 16px;
  }

  .kuang_xinxi {
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    border: 1px solid;
    border-top: 0;
  }

  .leftborder {
    border-left: 1px solid;
  }

  .textleft {
    text-align: left;
  }

  .kuang_list {
    display: flex;
    color: #333;
    font-size: 15px;
    font-weight: 500;
  }

  .list_tit {
    width: 130px;
    text-align: left;
    border-right: 1px solid #fff;
    box-sizing: border-box;
    padding-left: 20px;
    color:#000;
  }

  .list_cont {
    width: 300px;
    padding-left: 10px;
    box-sizing: border-box;
  }

  .table1 {
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    color:#333;
    font-weight: 500;
  }
  .table1 tr:nth-child(odd){
    background: rgba(241, 243, 245, 0.42);
  }
  .table1 tr:nth-child(even){
    background: rgba(255, 255, 255, 0.42);
  }

  .table1 td {
    border-top: 1px solid #fff;
    /*border-top: 2px solid #000;*/
    padding: 0 10px;
    height: 35px;
    line-height: 35px;
    box-sizing: border-box;
    width: 20%;
    text-align: center;
  }

  .heji {
    height: 35px;
    line-height: 35px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
  }

  .table2 {
    font-weight: bold;
    text-align: center;
    border-bottom: 0px;
  }

  .beizhu {
    padding-left: 10px;
    padding-top: 10px;
    padding-bottom: 20px;
  }

  .beizhu_cont p {
    line-height: 25px;
    margin: 0;
    text-indent: 25px
  }
</style>

<style type="text/css" media="all">
  .kk .kuang_xinxi:nth-child(even){
    background: rgba(255, 255, 255, 0.42);
  }
  .kk .kuang_xinxi:nth-child(odd){
    background: rgba(241, 243, 245, 0.42);
  }
  .kuang_xinxi{
    border: 1px solid #fff;
    border-top: 0;
  }

  .list_tit {
    text-align: left;
    border-right: 1px solid #fff;
    box-sizing: border-box;
    padding-left: 20px;
  }

  .list_cont {
    padding-left: 10px;
    box-sizing: border-box;
  }

  .leftborder {
    border-left: 1px solid #fff;
  }

  .textleft {
    text-align: left;
  }
</style>
<div class="" id="myModal1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <!--style="width:1100px!important;"-->
  <div class="modal-dialog" style="width:900px!important;">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
          <!--&times;-->
        </button>
        <h4 class="modal-title" id="myModalLabel">
          <div id="anni" class="btn btn-primary" style="    padding: 0 10px;margin-left: 10px;">报价单下载
          </div>
        </h4>
      </div>
      <input type="hidden" id="id" name="id" value="">
      <div class="modal-body" id="baojiadann" style="position:relative;">
        <img src="{$site.bjd_beijing}" alt="" style="position: absolute;left:0;top:0;width:100%;height:100%;z-index:0">
        <div class="kuang" style="border:0px;position: relative;z-index:1">

          <div style="display:flex;">
            <div style="width:83%;">
              <div style="font-size:40px;letter-spacing: 6px;color:#1D263D;  font-weight:bold;font-style: italic ">
                华资报价单
              </div>
              <div style="font-size:18px;color:#1D263D;position:relative;font-weight: 400;  ">

                SERVICE QUOTATION
              </div>
            </div>
            <div style="margin-top: -10px">
              <!--                            <img style="width:100px;" src="{$site.bjd_logo}" alt="" />-->
<!--              <img style="width: 98px;" src="{$site.bjd1_logo}" alt="" />-->
              <img style="width: 130px;    position: absolute;right: 10px;top: 10px;" src="{$site.bjd1_logo}" alt=""/>
            </div>
          </div>
          <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;">
            <div style="color:#1D263D;font-size:19px;">
              我们以客户需求为中心，为您提供最优的服务方案
            </div>
<!--            <div style="font-size:19px;color:#4E71FE;">-->
<!--              服务电话：{$site.bjd_phone}-->
<!--            </div>-->
          </div>


          <!--border-radius:4px 20px 4px 4px;-->
          <div style="  position: relative;color:#333;padding:8px;display:inline-block;padding-right:15px;display: flex;align-items: center;font-size: 17px">
            <img src="{$site.bjd_jbxx}" alt="" style="width:21px;height: 21px;margin-right:10px">
            基本信息
          </div>
          <div class="kk" style="padding:0;border-top: 1px solid #fff;margin-top: 10px;">
            <div class="kuang_xinxi">
              <div class="kuang_list">
                <div class="list_tit">车牌号码</div>
                <div class="list_cont" id="car_numm"></div>
              </div>
              <div class="kuang_list leftborder">
                <div class="list_tit">被服务人</div>
                <div class="list_cont" id="car_owner"></div>
              </div>


            </div>
            <div class="kuang_xinxi">
              <div class="kuang_list">
                <div class="list_tit">车架号</div>
                <div class="list_cont" id="chejiahao"></div>
              </div>
              <div class="kuang_list leftborder">
                <div class="list_tit">发动机号</div>
                <div class="list_cont" id="fadongji"></div>
              </div>

            </div>
            <div class="kuang_xinxi">
              <div class="kuang_list">
                <div class="list_tit">厂牌型号</div>
                <div class="list_cont" id="car_factory_num"></div>
              </div>
              <div class="kuang_list leftborder">
                <div class="list_tit">使用性质</div>
                <div class="list_cont" id="learned_namee"></div>
              </div>
            </div>
            <div class="kuang_xinxi">
              <div class="kuang_list">
                <div class="list_tit">初登日期</div>
                <div class="list_cont" id="car_register">2022-01-12</div>
              </div>
              <div class="kuang_list leftborder">
                <div class="list_tit">车型</div>
                <div class="list_cont" id="chexingg"></div>
              </div>
            </div>
            <div class="kuang_xinxi">
              <div class="kuang_list">
                <div class="list_tit">核定载质量</div>
                <div class="list_cont" id="car_carry_quality"></div>
              </div>
              <div class="kuang_list leftborder">
                <div class="list_tit">核定载客量</div>
                <div class="list_cont" id="car_carry_peo"></div>
              </div>
            </div>

          </div>
          <div style="color:#333;padding:8px;display:inline-block;padding-right:15px;display: flex;align-items: center;font-size: 17px;margin-top:30px;">
            <img src="{$site.bjd_xm}" alt="" style="width:21px;height: 21px;margin-right:10px">
            服务项目明细
          </div>
          <table class="table1" border="0" id="xiangmu" style="border:1px solid #fff">
            <tr style="">
              <td>服务项目</td>
              <td style="border-left: 2px solid #000;">服务金额(元)</td>
              <td style="border-left: 2px solid #000;">标准服务费</td>
            </tr>
            <tr>
              <td>机动车损失服务</td>
              <td style="border-left: 2px solid #000;">11000</td>
              <td style="border-left: 2px solid #000;">3330</td>
            </tr>
            <tr>
              <td>机动车第三者责任服务</td>
              <td style="border-left: 2px solid #000;">11000</td>
              <td style="border-left: 2px solid #000;">3330</td>
            </tr>
            <tr>
              <td>标准服务费</td>
              <td colspan="2" style="border-left: 1px solid #000;">11000</td>
            </tr>
            <tr>
              <td>折扣：</td>
              <td colspan="2" style="border-left: 1px solid #000;">50%</td>
            </tr>
            <tr>
              <td>折后服务费：</td>
              <td colspan="2" style="border-left: 1px solid #000;">566</td>
            </tr>
            <tr style="background:#3683D3;color:#fff">
              <td>附加服务项目</td>
              <td style="border-left: 2px solid #000;">服务金额（元）</td>
              <td style="border-left: 2px solid #000;">标准服务费</td>
            </tr>
            <tr>
              <td>医保外用药</td>
              <td style="border-left: 2px solid #000;">11000</td>
              <td style="border-left: 2px solid #000;">3330</td>
            </tr>
            <tr>
              <td>应缴服务费</td>
              <td colspan="2" style="border-left: 2px solid #000;">12154</td>
            </tr>

          </table>
          <div class="heji" style="display:none">合计</div>
          <table class="table1 table2" border="0" style="display:none">
            <tr>
              <td>标准服务费合计(元)</td>
              <!--<td style="border-left: 1px solid #000;">折扣(%)</td>-->
              <td style="border-left: 1px solid #000;">应缴服务费(元)</td>
            </tr>
            <tr>
              <td id="main_sum"></td>
              <!--<td style="border-left: 1px solid #000;" id="main_sumdiscount"></td>-->
              <td style="border-left: 1px solid #000;" id="main_free"></td>
            </tr>
          </table>
        </div>
        <div class="beizhu" style="display:none">
          <div class="beizhu_tit">备注：</div>
          <div class="beizhu_cont">
            <br>
            <br>
            <p>
              验车要求:车身前后左右45°角共4张照片拍全车身、1张车架号照，发动机照片（打着火的仪表盘），人车合影共7张，每张照片上附当日验车码。</p>
            <!-- <p>(2)验车要求：车身前后左右45度角验车要求：车身前后左右45度角验车要求：车身前后左右45度角验车要求：车身前后左右45度角</p> -->
            <p></p>
            <p></p>
            <p></p>
            <div></div>
          </div>
        </div>
        <div  style="display:flex;font-size: 16px;color: #666666;padding-top:15px;position:relative;">
          <div>
            报价日期：<span id="bjrq"></span>
          </div>
          <!--                    <div style="margin-left:30px">-->
          <!--                        报价人：<span id="bjr"></span>-->
          <!--                    </div>-->
        </div>
        <div>
          <img src="/bao.png" alt="" style="width:100%;margin-top:10px;transform: rotate(-180deg);"/>
        </div>
      </div>
    </div>
  </div>
</div>
<input type="hidden" id="jiaofei_id" value=""/>
<input id="zhifubao_zhifu" value="" type="hidden"/>
<input type="hidden" id="weixin_zhifu" value=""/>


<script src="/assets/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" charset="utf-8">
  $(function () {
    baojia({$row.id})
  })

  $("#anni").on("click", function () {
    doPrint()
  })

  function doPrint() {

    var printContents = $("#baojiadann").html();
    var w = window.open('', '_blank');
    w.document.write(printContents);
    w.document.write(`<style>
    .kuang {
        border: 2px solid #000;
        min-width: 800px;
        color: #000
    }

    .kuang .titlee {
        height: 60px;
        line-height: 55px;
        text-align: center;
        font-size: 25px;
        font-weight: bold;
        border-bottom: 2px solid #000;
    }

    .kk {
        line-height: 30px;
        padding: 10px 0;
        font-size: 16px;
    }

    .kuang_xinxi {
        display: flex;
        justify-content: space-between;
        margin: 0 auto;
    }

    .kuang_list {
           display: flex;
        color: #333;
        font-size: 15px;
        font-weight: 500;
    }

    .list_tit {
          width: 130px;
        text-align: left;
        border-right: 1px solid #fff;
        box-sizing: border-box;
        padding-left: 20px;
        color:#000;
    }

    .list_cont {
        width: 300px!important;
    }

    .table1 {
        border-top: 1px solid #fff;
        border-bottom: 1px solid #fff;
        width: 100%;
        border-collapse: collapse;
        font-size: 15px;
        color:#333;
        font-weight: 500;
    }
    .table1 tr:nth-child(odd){
        background: rgba(241, 243, 245, 0.42);
    }
    .table1 tr:nth-child(even){
        background: rgba(255, 255, 255, 0.42);
    }

    .table1 td {
        border-top: 1px solid #fff;
        /*border-top: 2px solid #000;*/
        padding: 0 10px;
        height: 35px;
        line-height: 35px;
        box-sizing: border-box;
        width: 20%;
        text-align: center;
    }

    .heji {
        height: 35px;
        line-height: 35px;
        text-align: center;
        font-size: 18px;
        font-weight: bold;
    }

    .table2 {
        font-weight: bold;
        text-align: center;
        border-bottom: 0px;
    }

    .beizhu {
        padding-left: 10px;
        padding-top: 10px;
        padding-bottom: 20px;
    }

    .beizhu_cont p {
        line-height: 25px;
        margin: 0;
        text-indent: 25px
    } .kuang_xinxi{
        border: 1px solid;
        border-top: 0;
    }
     .kk .kuang_xinxi:nth-child(even){
        background: rgba(255, 255, 255, 0.42);
    }
    .kk .kuang_xinxi:nth-child(odd){
        background: rgba(241, 243, 245, 0.42);
    }
    .kuang_xinxi{
        border: 1px solid #fff;
        border-top: 0;
    }

    .list_tit {
        text-align: left;
        border-right: 1px solid #fff;
        box-sizing: border-box;
        padding-left: 20px;
    }
    .list_cont {
        padding-left: 10px;
        box-sizing: border-box;
    }
    .leftborder{
        border-left: 1px solid #fff;
    }
    .textleft{
        text-align: left;
    }
    </style>`)
    w.document.close();
    w.focus();
    w.print();
    w.close();
  }

  // 报价单
  // 报价单
  function baojia(id) {
    $.ajax({
      url: "baojiadan",
      dataType: 'json',
      type: 'post',
      data: {'id': id, 'lei': 1},
      success: function (res) {
        console.log('车牌号', res.data.car_num)
        $("#car_numm").html(res.data.car_num)//车牌号码：
        $("#car_owner").html(res.data.car_owner)//被服务人
        $("#car_carry_peo").html(res.data.car_carry_peo)//核定载客量
        $("#car_carry_quality").html(res.data.car_carry_quality)//核定载质量
        var chexing = res.data.chexing;

        if (chexing == "网约车") {
          chexing = "网约或出租";
        }

        if (chexing == "2吨以下") {
          chexing = "2吨以下货车";
        }

        if (chexing == "6座以下") {
          chexing = "6座以下(私家车)";
        }
        if (chexing == "6-10座") {
          chexing = "6-10座(私家车)";
        }
        if (chexing == "货车") {
          chexing = "2吨以上货车";
        }
        console.log('chexing', res.data.car_use_natures)
        $("#chexingg").html(chexing)//车型：
        $("#car_factory_num").html(res.data.car_factory_num)//
        $("#learned_namee").html(res.data.car_use_natures)//

        $("#chejiahao").html(res.data.car_vin)//车架号：
        $("#fadongji").html(res.data.car_engine)//发动机号：

        if (res.data.ncd == '新车') {
          var ncd = '新车(含车损)'
        } else if (res.data.ncd == '0次') {
          var ncd = '0次(含车损)'
        } else if (res.data.ncd == '出险1次') {
          var ncd = '出险1次(含车损)'
        } else if (res.data.ncd == '出险2次') {
          var ncd = '出险2次(含车损)'
        } else if (res.data.ncd == '出险3次') {
          var ncd = '出险3次(含车损)'
        } else if (res.data.ncd == '出险3次以上') {
          var ncd = '出险3次以上(含车损)'
        } else {
          var ncd = res.data.ncd
        }
        $("#car_lastyear").html(ncd)//上年保险公司出险次数
        var car_check = res.data.chexing;
        $("#car_register").html(res.data.car_register)
        $("#car_check_res").html(car_check)//验车提示：
        $("#plan_strattime").html("自" + res.data.plan_strattime + " 起至 " + res.data.plan_endtime + " 止")//服务期限：
        $("#main_sum").html(res.data.main_sum)//标准服务费合计(元)
        $("#main_sumdiscount").html(res.data.main_sumdiscount)//折扣
        $("#main_free").html(res.data.main_free)//应缴服务费(元)
        var nr = '<img style="width:50px;margin-right:5px" src="/static/logo.png" title="1641541697419545.png" alt="图片1.png"><?php  echo model("Constants")->gs[1];?>';
        console.log(345)
        $("#logos").html(nr)
        //服务项目
        var tongchou = `<tr style="background:`+res.data.bjd_bgs+`;color:#fff">
            							<td style="">服务项目</td>
            							<td style="border-left: 1px solid #fff;">服务责任限额</td>
            							<td style="border-left: 1px solid #fff;">标准服务费</td>
            							<td style="border-left: 1px solid #fff;">折后服务费</td>
            						</tr>`
        //机动车损失服务
        if (res.data.main_name == 1) {
          tongchou += `<tr>
            							<td style="text-align:left;color:#000">机动车车损</td>
            							<td style="border-left: 1px solid #fff;">` + res.data.main_money + `</td>
            							<td style="border-left: 1px solid #fff;">` + res.data.main_standard + `</td>
                                        <td style="border-left: 1px solid #fff;" class="zong_tongchou">` + (res.data.main_standard * res.data.main_sumdiscount / 100).toFixed(2) + `</td>
            						</tr>`
        }
        //机动车第三者责任服务
        if (res.data.main_disan == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">机动车第三者责任</td>
										<td style="border-left: 1px solid #fff;">` + res.data.main_santong + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.main_biao + `</td>
                                        <td style="border-left: 1px solid #fff;" class="zong_tongchou">` + (res.data.main_biao * res.data.main_sumdiscount / 100).toFixed(2) + `</td>
									</tr>`
        }

        //车上人员责任服务(司机)
        if (res.data.siji == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">车上人员责任(司机)</td>
										<td style="border-left:1px solid #fff;">` + res.data.siji_tong + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.siji_biao + `</td>
                                        <td style="border-left: 1px solid #fff;" class="zong_tongchou">` + (res.data.siji_biao * res.data.main_sumdiscount / 100).toFixed(2) + `</td>
									</tr>`
        }
        //车上人员责任保险(乘客)
        console.log(res.data.ck_money)
        if (res.data.chengke == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">车上人员责任(乘客)</td>
										<td style="border-left: 1px solid #fff;">` + res.data.ck_money + '*' + res.data.chengke_zuo + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.ck_biao + `</td>
                                        <td style="border-left: 1px solid #fff;border-bottom: 1px solid #fff;" class="zong_tongchou">` + (res.data.ck_biao * res.data.main_sumdiscount / 100).toFixed(2) + `</td>
									</tr>`
        }
        //自燃损失服务
        if (res.data.dianwang == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">外部电网故障损失</td>
										<td style="border-left: 1px solid #fff;">` + res.data.dw_tong + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.dw_biao + `</td>
                                        <td style="border-left:1px solid #fff;" class="zong_tongchou">` + res.data.dw_ying + `</td>
									</tr>`
        }
        //三者医保外用药
        if (res.data.dao_name == 1) {
          tongchou += `
            						<tr>
										<td style="text-align:left;color:#000">医保外用药</td>
										<td style="border-left: 1px solid #fff;">` + res.data.dao_tong + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.dao_ying + `</td>
										<td style="border-left: 1px solid #fff;border-bottom:1px solid #fff;" class="zong_tongchou">` + res.data.dao_ying + `</td>
									</tr>`
        }
        //自然
        if (res.data.ziran == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">` + res.data.ziran_c + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.zi_tong + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.zi_biao + `</td>
										<td style="border-left:1px solid #fff;border-bottom:1px solid #fff;" class="zong_tongchou">` + res.data.zi_ying + `</td>
									</tr>`
        }
        //发动机涉水损失服务
        if (res.data.fdjsunshi == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">` + res.data.fd_c + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.fdj_tong + `</td>
										<td style="border-left:1px solid #fff;">` + res.data.fdj_ying + `</td>
										<td style="border-left:1px solid #fff;border-bottom:1px solid #fff;" class="zong_tongchou">` + res.data.fdj_ying + `</td>
									</tr>`
        }
        //指定修理厂服务
        if (res.data.zdxiuli == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">` + res.data.zd_c + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.zd_tong + `</td>
										<td style="border-left:1px solid #fff;">` + res.data.zd_ying + `</td>
										<td style="border-left: 1px solid #fff;border-bottom:1px solid #fff;" class="zong_tongchou">` + res.data.zd_ying + `</td>
									</tr>`
        }
        //车上货物责任服务
        if (res.data.huowu == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">` + res.data.huowu_c + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.hw_tong + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.hw_biao + `</td>
										<td style="border-left: 1px solid #fff;border-bottom:1px solid #fff;" class="zong_tongchou">` + res.data.hw_ying + `</td>
									</tr>`
        }
        //玻璃单独破碎服务
        if (res.data.boli == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">` + res.data.boli_c + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.bl_tong + `</td>
										<td style="border-left: 1px solid #fff;">` + res.data.bl_biao + `</td>
										<td style="border-left: 1px solid #fff;border-bottom:1px solid #fff;" class="zong_tongchou">` + res.data.bl_ying + `</td>
									</tr>`
        }
        //不计免赔服务
        if (res.data.buji == 1) {
          tongchou += `<tr>
										<td style="text-align:left;color:#000">不计免赔服务</td>
										<td style="border-left: 1px solid #fff;">` + res.data.bu_tong + `</td>
										<td style="border-left:1px solid #fff;">` + res.data.bu_biao + `</td>
									</tr>`
        }
        // 	标准服务费（标准服务费合计-医保外用药标准服务费）
        // 折后服务费（折后服务费：=应缴服务费 -dao_ying）
        tongchou += `<tr>
									<td colspan="2" style="text-align:left;color:#000">应缴服务费(元)：</td>

									<td colspan="1" style="border-left:1px solid #fff;"><p ">` + res.data.main_sum + `</p></td>
									<td colspan="1" style="border-left: 1px solid #fff;color:red;"><p class="shangyefei"">` + res.data.main_free + `</p></td>
								</tr>`

        if (!res.data.jq_price) {
          var jq_price = 0.00
        } else {
          var jq_price = res.data.jq_price
        }
        if (!res.data.cc_price) {
          var cc_price = 0.00
        } else {
          var cc_price = res.data.cc_price
        }
        var num11 = numAdd(jq_price, cc_price)

        var hejii = numAdd(num11, zong)
        var hejii = hejii.toFixed(2)
        tongchou += `<tr>
										<td colspan="2" style="text-align:left">折扣系数</td>
										<td colspan="2" style="border-left: 1px solid #fff;">` + res.data.main_sumdiscount / 100 + `</td>
									</tr>`

        tongchou += `<tr>
										<td style="text-align:left;color:#000">交强险：` + jq_price + `</td>
										<td style="border-left:1px solid #fff;color:#000">车船税：` + cc_price + `</td>
										<td colspan="2" style="border-left: 1px solid #fff;color:#000">合计：<span class="hejii"">` + hejii + `</span></td>
									</tr>`
        tongchou += `<tr>
									<td style="text-align:left;color:#000">备注</td>
									<td colspan="3" style="border-left:1px solid #fff;color:#4E71FE;text-align:left">此报价优惠，仅限当日有效，最终价格以审核为准</td>
								</tr>`
        $("#bjrq").html(res.data.yw_join_time)
        $("#bjr").html(res.data.yw_belonger)
        $("#xiangmu").html(tongchou)

        //总服务费（合计）
        var zong_tongchou = $('.zong_tongchou');//找到div里面所有的input
        var ztc = 0;
        for (var i = 0; i < zong_tongchou.length; i++) {
          ztc += +Number(zong_tongchou[i].textContent);
        }
        ztc += +Number(res.data.bu_biao * res.data.main_sumdiscount / 100);
        var zong = ztc.toFixed(2)
        $('.shangyefei').text(ztc.toFixed(2));

        var hejii = numAdd(num11, zong)
        var hejii = hejii.toFixed(2)
        $('.hejii').text(hejii);

      }
    })
  }

  function numAdd(num1, num2) {
    var baseNum, baseNum1, baseNum2;
    try {
      baseNum1 = num1.toString().split(".")[1].length;
    } catch (e) {
      baseNum1 = 0;
    }
    try {
      baseNum2 = num2.toString().split(".")[1].length;
    } catch (e) {
      baseNum2 = 0;
    }
    baseNum = Math.pow(10, Math.max(baseNum1, baseNum2));
    return (num1 * baseNum + num2 * baseNum) / baseNum;
  };

  // 		减法
  function numSub(num1, num2) {
    var baseNum, baseNum1, baseNum2;
    var precision;// 精度
    try {
      baseNum1 = num1.toString().split(".")[1].length;
    } catch (e) {
      baseNum1 = 0;
    }
    try {
      baseNum2 = num2.toString().split(".")[1].length;
    } catch (e) {
      baseNum2 = 0;
    }
    baseNum = Math.pow(10, Math.max(baseNum1, baseNum2));
    precision = (baseNum1 >= baseNum2) ? baseNum1 : baseNum2;
    return ((num1 * baseNum - num2 * baseNum) / baseNum).toFixed(precision);
  };

</script>
